/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aviso.property.helpers;

import aviso.property.entity.Property;

/**
 *
 * @author avgusti
 */
public class PropertyValues extends PropertyValueCountBase {

    private String min, max;

    public PropertyValues(Property p, String min, String max, Long count) {
        this.min = min;
        this.max = max;
        this.count = count;
        this.property = p;
    }

    public void update(String min, String max, Long count)
    {
        this.max=max;
        this.min=min;
        this.count=count;
    }
    @Override
    public boolean isLoaded() {
        if (property != null && min != null && max != null) {
            return true;
        }
        return false;
    }

    public String getMax() {
        return max;
    }

    public void setMax(String max) {
        if (!isLoaded()) {
            this.max = max.trim();
        }
    }

    public String getMin() {
        return min;
    }

    public void setMin(String min) {
        if(!isLoaded())
        this.min = min.trim();
    }

    @Override
    public Long getCount() {
        return super.getCount();
    }

    @Override
    public void setCount(Long count) {
        super.setCount(count);
    }

    @Override
    public String getValueForCompare() {
        return "";
    }
}
